<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <#--<link rel="stylesheet" href="../static/css/bootstrap.min.css">-->
    <#--<link rel="stylesheet" href="../static/css/reset.css">-->
    <#--<link rel="stylesheet" href="../static/css/main.css">-->
    <title>容智车联车厢管家</title>
    <style>
        html,body{height:100%;overflow:hidden;padding:0;margin:0;font-family: "Arial", "微软雅黑";}
        .wrap-div{width:100%;height:100%;position:relative;padding:75px 0 130px 0;box-sizing:border-box;}
        .logo{width:100%;height:55px;padding:10px 0;position:absolute;left:120px;top:0;}
        .logo-box{height:100%;width:1024px;margin:0 auto;}
        .logo-box>img{height:100%;margin-left:-96px;}
        .foot{width:100%;height:130px;margin:0 auto;position:absolute;left:0;bottom:0; text-align:center;line-height:150px;color:#ccc;}
        .foot-box{height:100%;width:1024px;margin:0 auto;}
        .mid-cont{height:100%;width:100%;overflow:hidden;position:relative;background:url(../static/images/main.jpg) no-repeat center center;background-size:100%;}
        .mid-cont>img{height:100%;display:block;margin:0 auto;}
        .info-div{width:100%;height:100%;position:absolute;top:0px;left:0;}
        .info-box{width:1024px;height:100%;margin:0 auto;padding:3% 0;box-sizing:border-box;}
        .info-cell{width:30%;height:100%;min-height:300px;background:rgba(255,255,255,0.7);float:right;padding:35px 24px 50px;box-sizing:border-box;border:1px solid rgba(204,204,204,0.1);}
        .info-cell>*{width:100%;padding:10px 0;}
        .info-cell>h2{margin-bottom:20px; text-align:center;color:#01a244;font-size:20px; letter-spacing:2px;font-weight:bold;}
        .info-cell>div>input{display:block;width:100%;padding:10px 5px;box-sizing:border-box;outline:none;border:1px solid rgba(204,204,204,0.4)}
        .marg-set{margin-top:-10px;margin-bottom:8px}
        button{background:#01a344;color:#fff;cursor:pointer;outline:none;}
    </style>
</head>
<body class="model-body">
<#--<div class="container-fluid">
    <!--头部&ndash;&gt;
    <div class="row-fluid">
        <div class="span2 m-t-10 bg-white">
            <img src="../static/images/v-logo.jpg" alt="容智惠远" style="height:51px;display:block;margin:0 auto;"/>
        </div>
        <div class="span10 text-center bg-color p-bt-10 m-t-10 bdbox" style="font:24px 微软雅黑;">
            车辆可视化平台
        </div>
    </div>
    <div class="row">
        <div class="span8 bg-white log-wind p-l-20">
            <form class="form-horizontal m-l-54" role="form">
                <div class="row form-group pad-10">
                    <label for="firstname" class="span4 control-label offset1">登录名：</label>
                    <div class="span6">
                        <input type="text" class="form-control" id="firstname" placeholder="请输入登录名">
                    </div>
                </div>
                <div class="row form-group pad-10">
                    <label for="lastname" class="span4 control-label offset1">密&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
                    <div class="span6">
                        <input type="password" class="form-control" id="lastname" placeholder="请输入密码">
                    </div>
                </div>
                <div class="row form-group pad-10">
                    <div class="checkbox span6 offset2  p-l-118">
                        <label>
                            <input type="checkbox">请记登录名称
                        </label>
                    </div>
                </div>
                <!--<div class="row form-group m-t-10 text-center">
                    <button type="submit" id="denglu" class="btn  btn-success span6 offset1">登录</button>
                </div>&ndash;&gt;
                <input type="button" id="denglu" class="btn  btn-success span6 offset1" style="margin: 0 auto;display:block;" value="登录">
            </form>
        </div>
    </div>
</div>-->


<div class="wrap-div">
    <div class="logo">
        <div class="logo-box">
            <img src="../static/images/logo.jpg"/>
        </div>
    </div>
    <div class="mid-cont">
        <div class="info-div">
            <div class="info-box">
                <div class="info-cell">
                    <h2>容智车联车厢管家</h2>
                    <div><input type="text" placeholder="用户名/账号" id="firstname"></div>
                    <div class="marg-set"><input type="password" placeholder="密码" id="lastname"></div>
                    <button id="denglu">登录</button>
                </div>
            </div>
        </div>
        <!--  <img src="images/main.jpg"/> -->
    </div>
    <div class="foot">
        <div class="foot-box">
            <small>公司版权所有-京ICP备1004654-京公网安备11018806220134号-京ICP证110567号</small>
        </div>
    </div>
</div>

<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/js/main.js"></script>
<script src="../static/js/session.js"></script>


<script>
    $(function(){

        //登录
        $('#denglu').click(function () {
            var username = $('#firstname').val();
            var password = $('#lastname').val();

            //鉴权
            $.ajax({
                type: "POST",
                url: "../user/checkLogin",
                dataType:'json',
                data:{
                    "username":username,
                    "password":password
                },
                success:function(data){
                    if(data.status != "success")
                    {
                        alert(data.msg);
                        return false;
                    }
                    else {
                        redirect();
                    }
                }
            });
        });

    });

    function redirect() {
        location.href = '../main/mainPage';
    }
</script>

</body>
</html>
